SET(COMMAND_TO_EXECUTE "")

SET(COUNTER 0)

FOREACH(SYS_FILE ${SYS_FILES})
  LIST(GET EXTRA_ARGS ${COUNTER} CURRENT_ARG)
  STRING(REPLACE " " ";" CURRENT_ARG ${CURRENT_ARG})
  LIST(APPEND COMMAND_TO_EXECUTE "COMMAND" "${CMD}" "-f" "${SYS_FILE}" "${CURRENT_ARG}")
  MATH(EXPR COUNTER "${COUNTER}+1")
ENDFOREACH(SYS_FILE ${SYS_FILES})

execute_process(${COMMAND_TO_EXECUTE})
